//
//  UIImageView+RxExtection_Kingfisher.swift
//  YKSwiftRxExtection
//
//  Created by linghit on 2023/3/31.
//  Copyright © 2023 Edward（本内容遵循MIT协议）. All rights reserved.
//

import UIKit
import RxSwift
import Kingfisher

extension Reactive where Base: UIImageView {
    
    public func imageUrlStr(placeHolderImage placeHolder: UIImage? = nil) -> Binder<String?> {
        Binder(self.base) { imageView, urlStr in
            if let url = urlStr {
                imageView.kf.setImage(with: URL.init(string: url), placeholder: placeHolder)
            }
        }
    }
}
